package com.example.reserveseat.Enums;

/**
 * 调用状态码
 */
public enum ReserveStrategyEnum {


    RANDOM("random");

    private final String value;

    ReserveStrategyEnum(String value) {
        this.value = value;

    }

    public String getValue() {
        return value;
    }

    public static ReserveStrategyEnum getEnumByType(String type) {
        for (ReserveStrategyEnum item : ReserveStrategyEnum.values()) {
            if (item.getValue().equals(type)) {
                return item;
            }
        }
        throw new RuntimeException("获取枚举类错误");
    }

}
